/*
 * @Author: TLL
 * @Date: 2020-10-13 09:49:26
 * @version: v1.1
 * @Descripttion: 
 * @LastEditors: TLL
 * @LastEditTime: 2020-10-13 13:11:12
 * @Auditor: TLL
 */
import server from '../../utils/server/server';

export async function getData(materialCode: any) {
  try {
    // if(materialCode.length < 3) return;
    return await server("/bk/api/material/Material/find", {
      fuzzyField: ["materialCode"],
      fuzzyQuery: true,
      fuzzyValue: materialCode,
      pages: {page: 1, pageSize: 10}
    });
  } catch (error) {
    return []
  }
}